package com.varian.system.dto;

import cn.hutool.core.date.DatePattern;
import com.varian.mybatis.base.BasePage;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author ben
 * @since 2024/7/23
 */
@Data
@Schema(title = "API日志数据对象")
public class ApiLogPageDTO extends BasePage {

    @Schema(title = "跟踪ID")
    private String traceId;

    @Schema(title = "请求方式")
    private String requestMethod;

    @Schema(title = "服务名称")
    private String serverName;

    @Schema(title = "状态码")
    private Integer httpStatus;

    @Schema(title = "开始时间")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime startTime;

    @Schema(title = "结束时间")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime endTime;
}
